home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
The World of Computer Software.iso
/
ljprt205.zip
/
LJPRINT.DOC
next >
Wrap
Text File
|
1992-10-08
|
25KB
|
459 lines
A Utility for HP's Laserjet II/III and Compatibles
>> Print Up To Four Pages Of Text On One Sheet Of Paper <<
v2.05
(C)opyright 1992
Zenware
4795 Creaser Rd
Westmoreland N.Y. 13490
All Rights Reserved
DISTRIBUTION NOTICE
This is "user-supported" software, it carries no warranties expressed or implied. It
is solely up to the user to determine its suitability for use on his/her machine.
LJPRINT is made available on a 'try before you buy' basis. It is not crippled in any
way, and has no 'advertising'. You may distribute this copy of LJPRINT.EXE and its
documentation, subject to the following conditions:
1. LJPRINT.EXE may be distributed freely without charge.
2. LJPRINT.EXE may not be sold, licensed, or a fee charged for its use. If
a fee is charged in connection with LJPRINT.EXE, it must cover the cost
of copying or dissemination only. Such charges must be clearly
identified as such by the originating party. Under no circumstances may
the purchaser be given the impression that he is buying LJPRINT.EXE
itself.
3. LJPRINT.EXE must be presented as a complete unit, including this
documentation. Neither LJPRINT.EXE nor its documentation may be amended
or altered in any way.
4. By granting you the right to distribute LJPRINT.EXE, you do not become
the owner of LJPRINT.EXE in any form.
Any other use, distribution or representation of LJPRINT.EXE is expressly
forbidden without the written consent of ZenWare.
Personal use license (U.S. funds) is $10 which should be mailed to the above
address if the program is used for a reasonable trial period (30 days). Please
use the registration form at the end of this document. Users who register will
receive the latest update when it becomes available.
Corporate users must contact me for corporate rate or site license
arrangements.
Page 1
INTRODUCTION:
This program was written to alleviate a minor problem that I've always had
when it came time to print a listing for debugging, archiving, etc., i.e. excessive
amounts of paper would be wasted in generating the hardcopy. The solution was to
write a simple to use program for the Hewlett-Packard Laserjet Series II/III
printers that would create a printed sheet holding a maximum of four pages of ASCII
text.
The program comes with a set of defaults built into the executable code. These
defaults can be over-ridden any time using command line options. If desired, these
options can also be saved permanently within the body of the executable code.
INSTALLATION:
Copy the executable to the desired drive and directory. If you ever foresee
making changes to the default settings, make sure that the path points to the drive
and directory containing the program. To invoke the program, at the DOS prompt
enter:
ljprint <option(s)> <source.fil>
The screen in Figure 1 will appear if no arguments are given.
If at any time you forget what the options are, entering the program name
'LJPRINT', at the DOS prompt and with no arguments, will bring up a help screen
showing the current defaults and available options. Multiple options can be
specified on the command line.
EXAMPLE: LJPRINT +w +n file.doc +k +Pg:-12
The following options are active:
do line wrap (+w)
add line numbers (+n)
delete file after printing (+k)
print from start of file to max of page 12 or actual file size
If the document that you are printing is formatted and has embedded formfeeds,
LJPRINT will output the pages correctly if the maximum number of lines specified,
the '+L:xx' option, is greater than or equal to the line count for the document
being printed. A Ctrl-C (^C), Ctrl-Break (^Brk) or ESC will terminate execution of
the program.
OPTIONS:
The filename (which can contain wildcards) and the various options, can be
given in any order, however, all options are verified before printing starts,
and all files are printed using the same settings.
Output Port (+P:x):
Specify the port that is to receive the file. If output to a file is desired,
than the use of the '+O' option is required. Only the port option can be saved
as a default. File output is available for each execution of the program only.
If file output is desired and no additional file qualifier is given, then the
output will be sent to the current working directory. Filenames and extensions
are ignored as qualifiers to this option. Output filenames consist of the
original filename with the extension '.PCL'. The files can then be transferred
Page 2
to an hp (or compatible) laser printer using the DOS command 'copy /b src-file
dest'. If duplicate filenames are encountered, you will be given the
opportunity to either over-write the file, replace it or rename it. In either
case, you will be forewarned!
Line Numbering (+N<:x>/-N):
With this option enabled, lines can be numbered from start of the document
till EOF is reached. Maximum number of lines supported is 9999, at which point
we'll wrap around and start from zero. An arbitrary starting line number can
be assigned the ouptut file using the '+N' option, e.g '+N:12'. The starting
page number cannot be saved in the default configuration. If no line number is
specified i.e. '+N', then the pages that will be printed will have their count
begin with one from the start of the file. On the other hand, if a line number
is present, that line number will take effect beginning with the first page to
be output.
Line Wrap (+/-W):
Disabled: Line will be truncated to a maximum of 80/95 characters.
Enabled: When enabled, linewrap will attempt to break a line on a natural
boundary, i.e. on detection of white space, comma, period etc. Occasionally
this may lead to a complete line being wrapped. Anyhow, wrapped lines are
flagged on the printout by '>>' characters.
Copies (+C:xx):
Using this option will allow the printer to make a specific number of copies
of the source file. This takes the burden off the program and shifts it to
firmware in the Laserjet.
Tab Size (+T:xx):
This option defines how tabs will be expanded during printing. The value
may have to be altered depending on how the source document was formatted.
Default Font(+DF:x):
Depending on your needs, and the quality of your eyesight, two choices of
fonts are available for use in generating the output copy. By default, the 8
Pt font is used by this program. This font is resident in the printer in the
form of firmware, i.e. hardcoded and burned into EPROM and yields very
readable characters that also look good. The alternative font is a 6 Pt font
that will cram approximately 20% more text on a sheet of paper than the 8 Pt
font.
Lines-Per-Page (+L6/8:xx):
This value specifies the maximum number of lines that will be output from the
given source file to each page of output. Each font has it's own default
specified; '+L6:xx' is used to set the default for the 6 Pt font and '+L8:xx'
for the 8 Pt font. If the output header is disabled, an additional two lines
can be printed for every page output, e.g. max lines/page for the 6 Pt font
can be 82 and for the 8 Pt font it can be 68. If the lines/page and the 'Hdr'
option conflict, the program will warn the user.
LJ Model (+M:x):
Identifies type of printer attached to computer. This is used in conjunction
with the 'Duplex Print' option.
Page 3
Duplex Print (+/-D):
Depending on the laserjet model chosen for the 'LJ Model' option, this feature
will either automatically print duplex pages at the printer (IID/IIID) or will
request user intervention to manually feed the initial printed pages back into
the printer (II, IIP, III, IIIP). When manually feeding the paper, the program
will specify the orientation of the page for the given binding.
Binding Edge (+BS/+BL):
Valid only during duplex printing. Specifies orientation of the text relative
to opposing face.
Kill (Delete) File after Printing (+K):
If the file you print is to be disposed of, you can let the program do it for
you. By invoking the +K(ill) option, the file will be deleted right after
printing. If this option is in effect, and the user aborts the printing, the
file will not be deleted.
Print Hdr/Pg (+/-Hdr):
If a header is desired to be printed for each page output, this is the option
to set. The output format is set by option '+Hf:x' (see below). While this
option is in effect, a max of 66 lines/page can be printed for the 8 Pt font
and 80 lines/page for the 6 Pt font. With the options disabled, the max number
of lines/page increases by two lines.
Hdr Fmt Style (+Hf:x):
Sets the header style in the printed output. The choice is in the manner in
which page numbers are printed. These numbers can be printed as 'Page xx' or
as 'Page x of y'. Naturally the second choice will cause an additional pass to
be made through the source file in order to get the page count.
Flag Empty Pg (+/-F):
If an empty page is encountered in printing, this option allows you the
ability to flag that fact. When active it will print 'THIS PAGE INTENTIONALLY
LEFT BLANK' on all empty pages, otherwise it will do a page eject.
Get Pg Cnt/Print Sel Pg(s):
Five different variations on this option are available:
+Pg -> will get the page count for the specified file(s)
+Pg:x -> will print the specified page for the file(s)
(+Pg:x-x will accomplish the same thing)
+Pg:x- -> will print pages starting with page 'x' to END-OF-FILE.
+Pg:x-xx -> print pages in the range of 'x' to 'xx'
+Pg:-xx -> print pages starting with the BEGINNING-OF-FILE to Pg 'xx'.
Match Date:
This is an additional qualifier that can be used in the file selection
criteria. This option allows for file matching based upon a user input date.
Files can be selected relative to this date, i.e. equal to target date, less
than the target date, etc. The command option format is:
Page 4
+Md[:qualifier][date]
Qualifier Date Format
NULL -> match date NULL -> use current date
Lt, Gt, Le, Ge perform the else use
functions implied MM:DD:YY, MM-DD-YY, MM/DD/YY
Match Time:
This option has similar consequences to '+Md'. The time parameter of a file is
matched in a manner similar to 'Md'. In fact the format and all qualifiers are
identical except for the time specification. In lieu of NULL, the time format
is HH:MM for the argument. The time is specified in 24 hr format, i.e. 00:00 -
12:00 is AM and 12:01 - 23:59 is PM. The command option format is:
+Mt[:qualifier][time]
Qualifier Time Format
(same as 'Md' option) NULL and HH:MM (24 Hr format)
Save Config (+S):
As this option implies, it's use will store the current command line options
within the body of the executable program. Like the other options, it can
appear anywhere on the command line.
NOTE: If the starting or ending page numbers are greater than the size of the file,
only those pages that can be printed will be, else the document will be skipped
entirely.
Source File:
This is the standard DOS spec of drive\dir\filespec (wildcards okay).
The following options can be saved as defaults:
Output Port Line Numbers Default Font
Line Wrap Copies Flag Empty Pg
Tabsize Lines/Page PrintHdr
LJ Model Duplex Print
Binding Edge Hdr Fmt Style
Because this program modifies its executable image when configuration changes
are saved to disk, any anti-virus programs that are monitoring the activity of the
disk may have a conniption. To avoid this, either disable this anti-virus feature or
else tell the program to ignore it.
Page 5
-------------------------------------------------------------------------------
ZenWare's HP Laserjet Utility Pgm
LJPRINT v2.05
Print up to four ASCII text pages on one sheet of paper
(For use with HP Laserjet II, IID, IIP, III, IIID and compatibles)
USE : ljprint <input file> <args>
Defaults: Options: Args:
Output Port : LPT1 x = PRN, COM1, COM2, COM3, COM4, +P:x
LPT1, LPT2, LPT3
To temporarily redirect output to a file +O<:dest>
'+O' -> will write file to current directory
'+O:drv:' -> will write file to drive 'drv:'
'+O:drv:\dir\' -> will write file to path 'drv:\dir\'
Line Numbers : OFF ON(1:9999)/OFF +N<:x>/-N
Line Wrap : OFF ON/OFF +/-W
Copies : 1 1:99 +C:xx
Tabsize : 8 1:12 +T:xx
Default Font : 8 Pt 6 = 6 Point 8 = 8 Point +DF:x
Lines/Page(6P) : 80 (95 char cols) 5:80 +L6:xx
Lines/Page(8P) : 66 (80 char cols) 5:66 +L8:xx
LJ Model : II,IIP,III 0 = II,IIP,III 1 = IID,IIID +M:x
Duplex Print : OFF ON(IID,IIID)/OFF +/-D
Binding Edge : SHORT SHORT/LONG +BS/+BL
Delete File after Printing: OFF ON +K
Print Hdr/Pg : Yes Yes/No +/-Hdr
Hdr Fmt Style : 'Page x' 0 = Pg x 1 = Pg x of yy +Hf:x
Flag Empty Pg : No Yes/No +/-F
Get Pg Cnt/Print Sel Pg(s):
Default: Print Pgs 1-EOF
Get Pg Cnt +Pg
Print Single Pg +Pg:x
Print fm Pg x to EOF +Pg:x-
Print fm Pg x to Pg xx +Pg:x-xx
Print fm BOF to Pg xx +Pg:-xx
Match on Date : Off +Md<:qual><date>
Qualifiers: Date Format:
NULL = exact match NULL = current date
LT = less than <date> otherwise
GT = greater than <date> MMDDYY
LE = less than or equal <date> MM-DD-YY
GE = Greater than or equal <date> MM/DD/YY
Match on Time : Off +Mt<:qual><time>
Qualifiers: Time Format:
(see 'Md' option) NULL = current Time
otherwise
HH:MM (24 Hr clock)
Example : ljprint +p:com1 +w file.txt
(send 'file.txt' to printer port 'COM1' and wrap the output text)
-------------------------------------------------------------------------------
Figure 1
Help Screen
Page 6
Examples
ljprint *.* +n +w +o +md
- print all files in current directory with linewrap and line numbering
enabled
- store output files in the current directory
- print only those files whose date stamp is today.
------------------------------------------------------------------------------------
ljprint +mt:gt12:00 +md:lt1/1/92 *.c +f
- send to printer all files with an extension of '.c'
- flag any empty page as such in the output
- for the file to be selected, its file date has to be less than 1 Jan 92 with
a time stamp greater than 12PM.
------------------------------------------------------------------------------------
ljprint c:\text\*.txt +pg +n +k
- generate a page count, with line numbering enabled, for all files in
directory 'c:\text\' with an extension of '.txt'.
- delete the files after printing successfully
------------------------------------------------------------------------------------
ljprint +o:c:\temp abc*.* +w +df:6
- print all files in the current directory that match 'abc*.*' filespec
- enable line wrap
- use 6 point font
- store output files in directory 'c:\temp'
------------------------------------------------------------------------------------
ljprint test.jnk +n +pg:13
- print page thirteen of file 'test.jnk' with line numbers referenced to page
one and starting with number one.
------------------------------------------------------------------------------------
ljprint test.jnk +pg:13 +n:120
- print page thirteen of file 'test.jnk' with output line numbering beginning
with number 120 as first line number on the page.
Page 7
LJPRINT.EXE v2.05 Registration Form
*** Please Type or Print Clearly ***
Name:_____________________________________________________________
Address:__________________________________________________________
__________________________________________________________
City/State:_______________________________________________________
Zip/Postal Code:__________________________________________________
Country:__________________________________________________________
Comments:_________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
Cost (U.S. Funds): $10.00 (NO Credit Cards)
Mail to: ZenWare
4795 Creaser Rd
Westmoreland, N. Y.
13490
Page 8